﻿Site.Index = Site.Index || {};
Site.Index.StartDatePicker = null;

/*------------------------------------------------------------------------------------*/
Site.Index.Init = function () {
	$("#selection-panels").accordion({
		heightStyle: "content",
		collapsible: true
	});

	Site.Index.StartDatePicker = $("#start-date-selector").datepicker({
		/* this function allows the calendar to gray out everything but thursdays: getDays() == 4 */
		beforeShowDay: function (date) {
			return [date.getDay() == 4];
		},
		onSelect: function (dateString, datePicker) {
			console.info("dateString:", dateString);
			console.info("datePicker:", datePicker.datepicker("getDate"));
		}
	});

	Site.Index.StartDatePicker.datepicker("setDate", "8/14/2014");
}

/*------------------------------------------------------------------------------------*/
Site.Index.InitHandlers = function () {
	
}

/*====================================================================================*/
$(document).on("ready", function () {
	Site.Index.Init();
	Site.Index.InitHandlers();
});
